package task3_2;

public class ThreeDigitNumber
{	
	public static int GenerateThreeDigitNumber()
	{
		final int min = 100;
        final int max = 999;
		return  min+(new java.util.Random()).nextInt(max-min);		
	}
	
	public  static int MaxDigitInThreeDigitNumber(int number)
	{
         int maxDigit = 0;
         while(number>0)
         {
             if(maxDigit<number%10)
                 maxDigit=number%10;
             number=number/10;
         }
         return maxDigit;		          
	}	
}
